Field Options
The <Field> element has two sub-elements that use an <Options> tag. Both <Query> and <Calculate> can use <Options> to populate fixed values in a Combo box. Multiple radio buttons can also be defined using <Options>.
Usually Field Options are configured on screens and in transactions within the <Field> configuration. There are two parts required for configuring <Options>. First, an <OptionValue> must be defined. This is the value that is stored in the database in the TextValue column. Then, an <OptionText> must be defined. This is the text a user will see displayed in the Combo box or radio button in
Combo Box Displaying Options
Field Option XML Example
Configuration Consideration
Saving the option text in the database saves processing time because it allows the screen to display the option text from the database without having to execute the configuration. While it saves processing time, it also makes it tricky for a rule to fully update the value of a field on a screen that used option text.
This occurs because a rule (CopyTo, for example) can only update one value in the database. If it updates the option text, then the user will see a correctly updated field in OIPA, but the actual value will be unchanged. If it updates the option value, then the correct value will be stored in the database, but the option text the user sees will remain unchanged, giving the impression that the value is also unchanged.
A possible solution to this would be to configure the CopyTo rule to invoke the screen rule holding the target field and lookup a new option text value that goes with the new option value. Then, it would need to save a new option text at the same time as the new option value.
It is also important to keep in mind any impact OnChange events could have on configuration if a combo box is used. OnChange events can cause combo boxes to be reloaded.